package com.naiterui.ehp.bs.cms.modules.base.service;

import com.naiterui.ehp.bp.bo.cms.AgreementBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.cms.common.vo.PageParamsVO;
import com.naiterui.ehp.bs.cms.common.vo.PageVO;
import com.naiterui.ehp.bs.cms.modules.base.vo.AgreementPageVO;
import com.naiterui.ehp.bs.cms.modules.base.vo.AgreementVO;

/**
 * 协议管理
 * 
 * @author yangfuya
 * @since 2021/10/12
 */
public interface IAgreementService {

    /**
     * 分页查询协议管理列表
     * 
     * @param pageParamsVO
     * @return
     */
    PageVO<AgreementPageVO> queryPage(String title, PageParamsVO pageParamsVO);

    /**
     * 获取协议详情
     * 
     * @param id
     * @return
     * @throws BusinessException
     */
    AgreementVO getById(Long id) throws BusinessException;

    /**
     * 新增或修改
     * 
     * @param agreementVO
     * @throws BusinessException
     */
    void saveOrUpdate(AgreementVO agreementVO) throws BusinessException;

    /**
     * 删除协议
     * 
     * @param id
     * @throws BusinessException
     */
    void deleteById(Long id) throws BusinessException;

    /**
     * 根据类型获取协议类型
     * 
     * @param type
     * @return
     * @throws BusinessException
     */
    AgreementBO getByType(String type) throws BusinessException;

}
